package com.jingdianjichi.auth.common.enums;

import lombok.Getter;

/**
 * 删除状态
 */
@Getter
public enum isDeleteFlagEnum {
    /**
     * 所有的枚举
     */
    DELETED(1, "已删除"),
    UN_DELETED(0, "未删除");

    private Integer code;
    private String desc;

    isDeleteFlagEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static isDeleteFlagEnum getByCode(Integer code) {
        for (isDeleteFlagEnum value : isDeleteFlagEnum.values()) {
            if (value.getCode().equals(code)) {
                return value;
            }
        }
        return null;
    }

}
